import { createRouter, createWebHistory } from 'vue-router'



const routes = [
  {
    // 设置默认路由
    path:'',
    redirect:'/home'
  },
  {
    path:'/home',
    component:() =>import('../views/Home.vue')      //懒加载写法
  },
  {
    path:'/application',
    component:() =>import('../views/Application.vue')
  },
  {
    path:'/shopping',
    component:() =>import('../views/Shopping.vue')
  },
  {
    path:'/me',
    component:() =>import('../views/Me.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
